74
Beginner’s Guide to Code Algorithms
74
STEP 2—Initialization
This code is required to set up the variables used in this program.
Sub HeavyLifting()
Dim ie As Object
Dim form As Variant
Dim pptSlide As Slide
Dim pptLayout As CustomLayout
Dim button As Variant
Dim LR As Integer
Dim var As String
Dim var1 As Object
Dim oHEle As HTMLUListElement ‘ Create HTML element (<ul>) object.
Dim sldOne As Slide
Dim MyCallout As Shape
Dim dlgOpen As FileDialog
‘ *** this is the link to the googledocs that controls the slides
‘ https://docs.google.com/document/d/1-6ZjkbA9nM1gCCIkot0dimp5Wmu5ZIPgB1D
joPB5eDo/edit?usp=sharing
‘ *** must have the word “SlideMover” to begin. N means forward. P means
backward.
‘ *** a # is the beginning of text to display, expects another # before it displays
‘ *** text is recognized as a web link and will display in full screen if it contains the
word http (will show in white)
‘ *** B will blank out a screen. Another B will bring it back
‘ *** X stops the control from the macro
‘ *** Manual navigation possible with up. down arrow, left right arrow, or P and N.
thisTime = currentTime
PreviousVar = ““
TotalSlides = objPresentation.Slides.Count
ShowText = ““
FirstT = 0
WhiteScreen = 0
LaunchLink = 0
‘objPresentation.Windows(1).Activate
STEP 2—read googledocs
The googledocs document is read every second until the end of the slide pack is
reached. It has only one record, hence the loop “Do Until EOF” is commented out.
The length of the record is checked. If the length is greater than it was previously,
then this indicated that the user has entered an input. This additional input is stored
in the variable “CommandWord” for further action.
While (ActivePresentation.SlideShowWindow.View.CurrentShowPosition <=
TotalSlides) And ForcedExit = 0
ManualInterrupt
Sleep (1000)
myURL = https://docs.google.com/document/d/1-6ZjkbA9nM1gCCIkot0dimp5W
mu5ZIPgB1DjoPB5eDo/edit?usp=sharing